home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
art&graf.ix
/
art-0039
/
source
/
dcglobal.def
< prev
next >
Wrap
Text File
|
1997-04-16
|
8KB
|
197 lines
DEFINITION MODULE DCGlobal;
(*--------------------------------------------------------------------*)
(* *)
(* This Module contains GLOBAL DATA TYPES used in the conversion *)
(* modules. *)
(* *)
(*--------------------------------------------------------------------*)
(*--------------------------------------------------------------------*)
(* 23/ 9/89 LGM - Redefine screen as bytes for use by expansion *)
(* routines. *)
(* 22/ 8/89 LGM - Add pointer types to pixel groups. *)
(* 10/ 9/89 LGM - Add TheWindow - use ManyWindows. *)
(* *)
(* 2.00 July 1988 L.G.Miller *)
(* *)
(* 1.10 August 1987 L.G.Miller *)
(* 1.00 April 1987 L.G.Miller *)
(*--------------------------------------------------------------------*)
FROM SYSTEM IMPORT WORD ;
FROM ManyWindows IMPORT WindowPtr;
(* ------------- Types related to the Hardware -------------- *)
CONST
LowRes = 0;
MedRes = 1;
HiRes = 2;
LowResMaxX = 319;
LowResMaxY = 199;
LowResNoPlanes = 4;
MedResMaxX = 639;
MedResMaxY = 199;
MedResNoPlanes = 2;
HiResMaxX = 639;
HiResMaxY = 399;
HiResNoPlanes = 1;
BITSPERWORD = 16;
TYPE
(* PRINTERS *)
PrinterTypes = (EpsonMX80, EpsonFX80, EpsonLQ80);
(*-----------------------------------------------------------------*)
(* Hardware display types *)
(*-----------------------------------------------------------------*)
Palette = ARRAY [ 0 .. 15 ] OF CARDINAL;
BitPlanesEnum = (BitPlane1, BitPlane2, BitPlane3, BitPlane4);
(*------------------------------------*)
(* Low-res screen - 4 planes *)
(*------------------------------------*)
LowRes16Pixels = ARRAY [ BitPlane1 .. BitPlane4 ] OF BITSET;
LowResLinePixelGroups = [ 0 .. LowResMaxX DIV BITSPERWORD ];
LowResScreenLine = ARRAY LowResLinePixelGroups OF LowRes16Pixels;
LowResScreen = ARRAY [ 0 .. LowResMaxY ] OF LowResScreenLine;
LowRes16PixelsPtr = POINTER TO LowRes16Pixels;
LowResPixelGroupPtr = POINTER TO LowResLinePixelGroups;
LowResScreenLinePtr = POINTER TO LowResScreenLine;
LowResCharPlane = ARRAY [ BitPlane1 .. BitPlane4 ]
OF ARRAY [ 0 .. 1 ] OF CHAR;
LowResCharScreenLine = ARRAY LowResLinePixelGroups OF LowResCharPlane;
LowResCharScreen = ARRAY [ 0 .. LowResMaxY ] OF LowResCharScreenLine;
(*------------------------------------*)
(* Med-res screen - 2 planes *)
(*------------------------------------*)
MedRes16Pixels = ARRAY [ BitPlane1 .. BitPlane2 ] OF BITSET;
MedResLinePixelGroups = [ 0 .. ( MedResMaxX DIV BITSPERWORD ) ];
MedResScreenLine = ARRAY MedResLinePixelGroups OF MedRes16Pixels;
MedResScreen = ARRAY [ 0 .. MedResMaxY ] OF MedResScreenLine;
MedRes16PixelsPtr = POINTER TO MedRes16Pixels;
MedResPixelGroupPtr = POINTER TO MedResLinePixelGroups;
MedResScreenLinePtr = POINTER TO MedResScreenLine;
MedResCharPlane = ARRAY [ BitPlane1 .. BitPlane2 ] OF
ARRAY [ 0 .. 1 ] OF CHAR;
MedResCharScreenLine = ARRAY MedResLinePixelGroups OF MedResCharPlane;
MedResCharScreen = ARRAY [ 0 .. MedResMaxY ] OF MedResCharScreenLine;
(*------------------------------------*)
(* Hi-res screen - 1 plane *)
(*------------------------------------*)
HiRes16Pixels = BITSET;
HiResLinePixelGroups = [ 0 .. ( HiResMaxX DIV BITSPERWORD ) ];
HiResScreenLine = ARRAY HiResLinePixelGroups OF HiRes16Pixels;
HiResScreen = ARRAY [ 0 .. HiResMaxY ] OF HiResScreenLine;
HiRes16PixelsPtr = POINTER TO HiRes16Pixels;
HiResPixelGroupPtr = POINTER TO HiResLinePixelGroups;
HiResScreenLinePtr = POINTER TO HiResScreenLine;
HiResCharPlane = ARRAY [ 0 .. 1 ] OF CHAR;
HiResCharScreenLine = ARRAY HiResLinePixelGroups OF HiResCharPlane;
HiResCharScreen = ARRAY [ 0 .. HiResMaxY ] OF HiResCharScreenLine;
(*-----------------------------------*)
(* Degas picture file description *)
(*-----------------------------------*)
DegasPicture =
RECORD
CASE resolution : CARDINAL OF
LowRes : LowPalette : Palette;
CASE :BOOLEAN OF
TRUE : LowResPicture : LowResScreen |
FALSE : LowResCharPicture : LowResCharScreen |
END; |
MedRes : MedPalette : Palette;
CASE :BOOLEAN OF
TRUE : MedResPicture : MedResScreen |
FALSE : MedResCharPicture : MedResCharScreen |
END; |
HiRes : HiPalette : Palette;
CASE :BOOLEAN OF
TRUE : HiResPicture : HiResScreen |
FALSE : HiResCharPicture : HiResCharScreen |
END; |
ELSE
END;
END;
(*----------------------------------------------------------------------*)
(* Print pattern conversion types *)
(*----------------------------------------------------------------------*)
PrintBitPatternSet = SET OF [ 0 .. 3 ] ;
(* print in a square: 0 1 *)
(* ( low -> high ) 2 3 *)
(* *)
(* print in a rectangle: 0 *)
(* ( medium -> high ) 1 *)
PaletteEntry =
RECORD
RedComponent,
GreenComponent,
BlueComponent : INTEGER;
ColourIndex : INTEGER;
PrintBitPattern : PrintBitPatternSet;
END;
PrintPalette = ARRAY [ 0 .. 15 ] OF PaletteEntry;
(*----------------------------------------------------------------------*)
(* only the first 4 will be used in medium res pictures. *)
(*----------------------------------------------------------------------*)
(*----------------------------------------------------------------------*)
(* Subset of complete picture *)
(*----------------------------------------------------------------------*)
PictureImage =
RECORD
StartX, StartY,
Width,
Height : INTEGER;
END;
(*----------------------------------------------------------------------*)
(* Printed image size ( dots ) & start co-ords ( char units ) *)
(*----------------------------------------------------------------------*)
PrintImage =
RECORD
StartCharX, StartCharY, (* character units *)
Width,
Height (* dots *) : INTEGER;
QueryLandscapePrint : BOOLEAN; (* Y/N *)
END;
(*-----------------------------------------------------------------*)
(* End of Global Types *)
(*-----------------------------------------------------------------*)
VAR
TheWindow : WindowPtr;
END DCGlobal.